//
//  YXYResumeOnOffTableViewCell.m
//  Topit
//
//  Created by dllo on 15/12/17.
//  Copyright © 2015年 YXY. All rights reserved.
//

#import "YXYResumeOnOffTableViewCell.h"

@implementation YXYResumeOnOffTableViewCell

- (void)dealloc {
    [_label release];
    [_nightNoOff release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.label = [[UILabel alloc] initWithFrame:CGRectZero];
        [self addSubview:self.label];
        [_label release];
        
        self.nightNoOff = [[UISwitch alloc] initWithFrame:CGRectZero];
        self.nightNoOff.tintColor = [UIColor whiteColor];
        [self addSubview:self.nightNoOff];
        [_nightNoOff release];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.label.frame = CGRectMake(15, 5, 200, 40);
    self.nightNoOff.frame = CGRectMake(self.width - 70, 5, 100, 40);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
